package com.example.mqdemo.rabbitmq.HelloWorld.consumer;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/*
消息消费方
 */
@Component
public class HelloWorldConsumer {


    //消息消费方，监听队列
    @RabbitListener(queues = "helloworld")
    public void consumer(String msg){
        System.out.println("hellowold消费" + msg );
    }
}
